<script src="/javascripts/calendar.js"></script>
<link href="/stylesheets/base.css" rel="stylesheet" type="text/css" media="all" />
<link href="/stylesheets/awesome-form.css" rel="stylesheet" type="text/css" media="all" />

<div style="background-color:#ccffaa">
<h2>Editing <a href="<%=@note.relative_url%>"><%=@note.relative_url%></a></h2>
</div>

<br/>

<form class="awesome" method="post" action="">

	<input type="hidden" name="parent" id="parent" value="<%=@note.parent%>" />

	<label for="uid">Name </label>
	<input type="text" name="uid" id="uid" value="<%=@note.uid%>" />
	<br/>
	<p class="desc">This must be a string consisting only of lower case characters and no spaces.  If you don't specify a unique identifier the system will create one for you.</p>

	<label for="title">Title </label>
	<input type="text" name="title" id="title" value="<%=@note.title%>" />
	<br/>

	<label for="link">Link </label>
	<input type="text" name="link" id="link" value="<%=@note.link%>" />
    <br/>
	
	<label for="keywords">Keywords </label>
	<input type="text" name="tagstring" id="tagstring" value="<%=@note.tagstring%>" />
    <br/>
	
	<label for="location">Location </label>
	<input type="text" name="location" id="location" value="<%=@note.location%>" />
    <br/>
	
	<label for="handler">Handler </label>
	<input type="text" name="handler" id="handler" value="<%=@note.handler%>" />
	<br/>
					
	<DIV ID="testdiv1" STYLE="position:absolute;visibility:hidden;background-color:white;layer-background-color:white;"></DIV>
	<DIV ID="testdiv2" STYLE="position:absolute;visibility:hidden;background-color:white;layer-background-color:white;"></DIV>
	<script LANGUAGE="JavaScript" ID="jscal1x">
    var cal1x = new CalendarPopup("testdiv1");
    var cal2x = new CalendarPopup("testdiv2");
    </script>
	
	</script>
	<label for="begins"><A HREF="#"
	                     onclick="cal1x.select(document.forms[0].begins,'anchor1x','dd/MM/yyyy'); return false;"
	                     title="cal1x.select(document.forms[0].begins,'anchor1x','dd/MM/yyyy'); return false;">Begins</a>
	</label><a name="anchor1x" id="anchor1x"></a>
	<input type="text" name="begins" id="begins" value="<%=@note.begins%>" />
    <br/>
	
	<label for="ends"><A HREF="#"
	                     onclick="cal2x.select(document.forms[0].ends,'anchor2x','dd/MM/yyyy'); return false;"
	                     title="cal2x.select(document.forms[0].ends,'anchor2x','dd/MM/yyyy'); return false;">Ends</a>
	</label><a name="anchor2x" id="anchor2x"></a>
	<input type="text" name="ends" id="ends" value="<%=@note.ends%>" />
    <br/>
	
	<label for="description">Description </label>
	<textarea rows="4" cols="45" id="description" name="description"><%=@note.description%></textarea>
	<br/>
	<p class="desc">Please enter a description here</p>
	<br/>

    <label for="media">Associate a file </label>
	<input type="file" name="upload" id="upload" />
    <br/>

	<label for="image">Add a depiction for the area</label>
	<input type="file" name="depiction" id="depiction" />
    <p class="desc">Click the Browse button to find the picture file on your computer.</p>
	<br/>

	<label for="perms">Permissions</label>
	<select name="perms" id="perms">
		<option value="0" >Public</option>
    	<option <%=@note.perms!=1||"selected"%> value="1">Protected (Read Only)</option>
		<option <%=@note.perms!=2||"selected"%> value="2">Private</option>
    	<option <%=@note.perms!=3||"selected"%> value="3">Private + Read Only</option>
	</select>
	<br/>

	<label for="members">Members</label>
	<input type="text" name="members" id="members" value="<%=@members%>" />
	<br/>




    <br/>
	<input type="hidden" name="submit" id="submit" />
	<input type="submit" value="submit" style="width:70px" />

</form>
